package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ACustomeruserMapper;
import com.ruoyi.system.domain.ACustomeruser;
import com.ruoyi.system.service.IACustomeruserService;

/**
 * 用户信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-15
 */
@Service
public class ACustomeruserServiceImpl implements IACustomeruserService 
{
    @Autowired
    private ACustomeruserMapper aCustomeruserMapper;

    /**
     * 查询用户信息
     * 
     * @param userId 用户信息主键
     * @return 用户信息
     */
    @Override
    public ACustomeruser selectACustomeruserByUserId(Long userId)
    {
        return aCustomeruserMapper.selectACustomeruserByUserId(userId);
    }

    /**
     * 查询用户信息列表
     * 
     * @param aCustomeruser 用户信息
     * @return 用户信息
     */
    @Override
    public List<ACustomeruser> selectACustomeruserList(ACustomeruser aCustomeruser)
    {
        return aCustomeruserMapper.selectACustomeruserList(aCustomeruser);
    }

    /**
     * 新增用户信息
     * 
     * @param aCustomeruser 用户信息
     * @return 结果
     */
    @Override
    public int insertACustomeruser(ACustomeruser aCustomeruser)
    {
        aCustomeruser.setCreateTime(DateUtils.getNowDate());
        return aCustomeruserMapper.insertACustomeruser(aCustomeruser);
    }

    /**
     * 修改用户信息
     * 
     * @param aCustomeruser 用户信息
     * @return 结果
     */
    @Override
    public int updateACustomeruser(ACustomeruser aCustomeruser)
    {
        aCustomeruser.setUpdateTime(DateUtils.getNowDate());
        return aCustomeruserMapper.updateACustomeruser(aCustomeruser);
    }

    /**
     * 批量删除用户信息
     * 
     * @param userIds 需要删除的用户信息主键
     * @return 结果
     */
    @Override
    public int deleteACustomeruserByUserIds(Long[] userIds)
    {
        return aCustomeruserMapper.deleteACustomeruserByUserIds(userIds);
    }

    /**
     * 删除用户信息信息
     * 
     * @param userId 用户信息主键
     * @return 结果
     */
    @Override
    public int deleteACustomeruserByUserId(Long userId)
    {
        return aCustomeruserMapper.deleteACustomeruserByUserId(userId);
    }

    @Override
    public ACustomeruser selectOpenId(String openId) {
        return aCustomeruserMapper.selectOpenId(openId);
    }
}
